---
title: 'Cypress.currentRetry | Cypress Documentation'
description: Cypress.currentRetry is a number representing the current test retry count.
sidebar_label: currentRetry
sidebar_position: 80
---

<ProductHeading product="app" />

# Cypress.currentRetry

`Cypress.currentRetry` is a number representing the current
[test retry](/app/guides/test-retries) count.

:::caution

Note that `Cypress.currentRetry` may only be used inside tests and
[test hooks](/app/core-concepts/writing-and-organizing-tests#Hooks), and will
be `null` outside of tests and test hooks.

:::

## Syntax

```javascript
Cypress.currentRetry
```

## Examples

### Get current test retry

```javascript
it('example', () => {
  expect(Cypress.currentRetry).to.eq(0)
})
```

## History

| Version                                    | Changes                      |
| ------------------------------------------ | ---------------------------- |
| [12.3.0](/app/references/changelog#12-3-0) | Added `Cypress.currentRetry` |
